import 'package:flutter/material.dart';

class PizzaToOtherChefView extends StatelessWidget {

  final Function changePizzaToOtherAction;

  const PizzaToOtherChefView({Key key, this.changePizzaToOtherAction}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.transparent,
      body: Center(
        child: Container(
          width: 400,
          height: 300,
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.all(Radius.circular(10))
          ),
          child: ListView.builder(
            itemCount: 7,
            itemBuilder: (context, idx){
              return ListTile(
                title: Text("Pizza Chef $idx"),
                onTap: (){
                  changePizzaToOtherAction("Pizza Chef $idx");
                  Navigator.of(context).pop();
                },
              );
            }
          ),
        ),
      ),
    );
  }
}